package com.maoye.ossp.biz.statement.controller;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.hotent.base.api.query.QueryFilter;
import com.maoye.ossp.biz.statement.entity.SupplierRebate;
import com.maoye.ossp.biz.statement.service.SupplierRebateService;
import com.maoye.ossp.common.entity.Page;
import com.maoye.ossp.common.web.BaseController;

/**
 * 返利单 controller类
 * @author 梁涛
 *
 */
@Controller
@RequestMapping(value = "statement/supplierRebate/")

public class SupplierRebateController extends BaseController {
	@Resource
	private SupplierRebateService supplierRebateService;
	
	@RequestMapping(value = "list")
	public String list(SupplierRebate supplierRebate,HttpServletRequest request,
			HttpServletResponse response, Model model) {
		QueryFilter queryFilter = getQuerFilter(request,supplierRebate);
		Page<SupplierRebate> page = (Page<SupplierRebate>) supplierRebateService
				.find(queryFilter);
		model.addAttribute("page", page);
		model.addAttribute("supplierRebate", supplierRebate);
		return resultPage("/biz/statement/supplierRebate/list", model, request);
	}
}